package com.ytf.core.web.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

/**
 * <p>
 * 权限Dto
 * </p>
 *
 * @author YTF
 * @since 2025-05-20
 */
@Data
@Schema(description = "权限数据传输对象")
public class PermissionDto {

    /**
     * 权限标识（如user:create）
     */
    @NotBlank(message = "权限标识不能为空")
    @Schema(description = "权限标识，格式为资源类型:操作类型，如user:create", requiredMode = Schema.RequiredMode.REQUIRED)
    private String permKey;

    /**
     * 资源类型（如user/order）
     */
    @NotBlank(message = "资源类型不能为空")
    @Schema(description = "资源类型，如user或order", requiredMode = Schema.RequiredMode.REQUIRED)
    private String resourceType;

    /**
     * 操作类型（如create/delete）
     */
    @NotBlank(message = "操作类型不能为空")
    @Schema(description = "操作类型，如create、delete等", requiredMode = Schema.RequiredMode.REQUIRED)
    private String action;

    /**
     * 权限描述
     */
    @NotBlank(message = "权限描述不能为空")
    @Schema(description = "权限的详细描述信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private String description;
}